package com.carboncntr.helper;

import java.util.List;

import org.hibernate.HibernateException;
import org.hibernate.Session;

import com.carboncntr.tables.Lookup;
import com.carboncntr.util.HibernateUtil;

public class LookupHelper {
	public static List<Lookup> listlookup() 
	{ 
		Session session = HibernateUtil.getSessionfactory().openSession();
		List<Lookup> lookupList = null;
		try { 
			lookupList = session.createQuery("from Lookup").list(); 

		} catch (HibernateException e) { 
			e.printStackTrace(); 
		} finally { 
			session.close(); 
		} 
		return lookupList;
	}
}
